package cn.gok.tech.baiduocr.controller;

import cn.gok.tech.baiduocr.service.OperationService;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class OCRController {

    @Autowired
    private OperationService operations;

    @RequestMapping("ocr")
    public String getFont(HttpServletRequest request) {
        String path = request.getParameter("path");
//        System.out.println(path);
        String ocrStr = operations.fontOCR(path);
//        System.out.println(ocrStr+"*************");
        return ocrStr;

    }

}
